package com.homedo.microservice.open.service.gateway.manager.web.api;

import com.homedo.common.bean.data.ResponseData;
import com.homedo.microservice.open.service.gateway.manager.web.api.constant.RemoteService4OpenServiceGatewayManagerWebServiceConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Api(value = "拉入拉出操作接口", description = "拉入拉出操作接口")
@RequestMapping(RemoteService4OpenServiceGatewayManagerWebServiceConstant.SERVICE_ID + "/pull")
public interface IPullServiceRemote {

    @ApiOperation(value = "拉入")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "gateway", value = "网关应用", dataType = "String", required = true, paramType = "query"),
            @ApiImplicitParam(name = "env", value = "环境:dev,fat,uat,pro", dataType = "String", required = true, paramType = "query"),
            @ApiImplicitParam(name = "route", value = "路由ID", dataType = "String", required = true, paramType = "query"),
            @ApiImplicitParam(name = "version", value = "版本", dataType = "String", required = false, paramType = "query"),
            @ApiImplicitParam(name = "url", value = "拉入的服务器地址,例如:http://10.10.0.1:8080", dataType = "String", required = true, paramType = "query"),
            @ApiImplicitParam(name = "urlCount", value = "服务器总数", dataType = "int", required = true, paramType = "query"),
            @ApiImplicitParam(name = "opUser", value = "操作者", dataType = "String", required = true, paramType = "query"),
            @ApiImplicitParam(name = "opPwd", value = "操作密码", dataType = "String", required = true, paramType = "query")
    })
    @GetMapping(value = "in")
    ResponseData in(String gateway, String env, String route, String version, String url, int urlCount, String opUser, String opPwd);

    @ApiOperation(value = "拉出")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "gateway", value = "网关应用", dataType = "String", required = true, paramType = "query"),
            @ApiImplicitParam(name = "env", value = "环境:dev,fat,uat,pro", dataType = "String", required = true, paramType = "query"),
            @ApiImplicitParam(name = "route", value = "路由ID", dataType = "String", required = true, paramType = "query"),
            @ApiImplicitParam(name = "url", value = "拉出的服务器地址,例如:http://10.10.0.1:8080", dataType = "String", required = true, paramType = "query"),
            @ApiImplicitParam(name = "opUser", value = "操作者", dataType = "String", required = true, paramType = "query"),
            @ApiImplicitParam(name = "opPwd", value = "操作密码", dataType = "String", required = true, paramType = "query")
    })
    @GetMapping(value = "out")
    ResponseData out(String gateway, String env, String route, String url, String opUser, String opPwd);
}
